import java.util.Scanner;

/**
 * @author vivi
 * @description
 * @date 2024/5/25
 */
public class demo1 {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] arr = scanner.next().toCharArray();
        boolean[] flag = new boolean[10];
        int n = arr.length;

        for (int i = n-1; i >= 0; i--) {
            int ret = arr[i] - '0';
            if (! flag[ret]) {
                System.out.print(ret);
                flag[ret] = true;
            }
        }
    }
}
